package jmu.edu.yjc.controller;

import jmu.edu.yjc.domain.ResponseResult;
import jmu.edu.yjc.service.PostService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/personal/post")
public class PostController {
    @Resource
    private PostService postService;
    @GetMapping("/list")
    public ResponseResult listAllPost(){
        return ResponseResult.okResult(postService.list());
    }
}
